/*
 * Copyright (c) 2018-2999 九五云信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.user.comment.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.Order;
import com.yami.shop.bean.model.UserExtension;
import com.yami.shop.bean.param.UserUpdateParam;
import com.yami.shop.user.comment.dto.LevelDetailDto;
import com.yami.shop.user.comment.dto.UserLevelDto;
import com.yami.shop.user.comment.model.UserLevel;
import com.yami.shop.user.comment.model.UserLevelLog;

import java.util.List;

/**
 * 会员等级
 *
 * @author LGH
 * @date 2020-02-26 16:03:14
 */
public interface UserLevelService extends IService<UserLevel> {


    /**
     * 根据会员等级类型获取会员等级列表信息
     * @param userLevelType 见 枚举UserLevelType
     * @return
     */
    List<UserLevelDto> listUserLevelsByUserLevelType(Integer userLevelType);

    /**
     * 根据会员等级类型移除会员等级列表缓存
     * @param userLevelType
     */
    void removeUserLevelsByUserLevelTypeCache(Integer userLevelType);

    void paySuccess(String payNo);

    void addGrowthAndScore(double growthPrice, Integer score, String userId, String bizId, UserExtension userExtension, Integer type);

    void levelUp(List<UserLevel> userLevels, UserLevelLog userLevelLog, UserExtension user, Integer historyLevel);

    void updateUserLevelList(UserLevel userLevel);

    Boolean deleteUserLevel(UserLevel userLevel);

    Boolean updateUserLevel(UserLevel userLevel);

    UserLevel getUserLevelById(Long id);

    String getUserLevelName(UserExtension userExtension);

    List<LevelDetailDto> selectLevelAndRights(Integer levelType);

    Boolean batchUpdateGrowth(UserUpdateParam param);

    Boolean batchUpdateScore(UserUpdateParam param);

}
